//
//  ObservableType+Ex.swift
//  
//
//  Created by 孙长坦 on 2022/7/28.
//

import Foundation
import RxSwift
import Moya

public extension ObservableType where Element == ProgressResponse {
    /// Filters out responses where `statusCode` falls within the range 200 - 299.
    func filterSuccessfulStatusCodes() -> Observable<Element> {
        flatMap { Observable.just(try $0.filterSuccessfulStatusCodes()) }
    }
}
